package com.sz10.p2p.mapper;

import com.sz10.p2p.model.LoanInfo;

import java.util.List;
import java.util.Map;

public interface LoanInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(LoanInfo record);

    int insertSelective(LoanInfo record);

    LoanInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(LoanInfo record);

    int updateByPrimaryKey(LoanInfo record);

    /**
     * 获取平均历史年化收益率
     * @return
     */

    Double selectHistoryAvgRate();

    /**
     * 获取平台累计收益率
     * @return
     */

    Double selectAllBidMoney();

    /**
     * 根据产品类型查询产品list集合
     * @param paramMap
     * @return
     */

    List<LoanInfo> selectLoanInfoListByProductType(Map<String, Object> paramMap);

    /**
     * 根据产品类型查询总记录数
     * @param paramMap
     * @return
     */
    Long selectLoanInfoTotalPage(Map<String, Object> paramMap);
}